﻿<UserControl x:Class="Esponce.Views.TrackCampaignView"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:m="clr-namespace:Esponce.Models"
	xmlns:v="clr-namespace:Esponce.Views"
  mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="400">
	<UserControl.DataContext>
		<m:TrackCampaignViewModel />
	</UserControl.DataContext>
	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="10" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="20" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="10" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>

		<!-- Input parameters -->
		<TextBlock Grid.Row="0" Text="INPUT PARAMETERS" Style="{StaticResource TitleStyle}" />

		<Border Grid.Row="2" Style="{StaticResource BorderStyle}">
			<Grid Margin="20">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="75" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="Auto" />
				</Grid.ColumnDefinitions>
				<TextBlock Text="Campaign id:" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
				<TextBox Grid.Column="1" Text="{Binding CampaignId, Mode=TwoWay}" Margin="0,0,10,0" VerticalContentAlignment="Center" />
				<StackPanel Grid.Column="2" Orientation="Horizontal">
					<Button Content="Get" Padding="7,0,7,2" Click="btnSelect_Click" FontWeight="Bold" />
					<Button Content="Create" Padding="7,0,7,2" Click="btnInsert_Click" Margin="10,0,0,0" />
					<Button Content="Update" Padding="7,0,7,2" Click="btnUpdate_Click" Margin="10,0,0,0" />
					<Button Content="Delete" Padding="7,0,7,2" Click="btnDelete_Click" Margin="10,0,0,0" />
				</StackPanel>
			</Grid>
		</Border>

		<!-- Data Grid -->
		<TextBlock Grid.Row="4" Text="OUTPUT: CAMPAIGN DATA" Style="{StaticResource TitleStyle}" />

		<Border Grid.Row="6" Style="{StaticResource BorderStyle}">
			<Grid Margin="20" DataContext="{Binding Campaign}">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="*" />
				</Grid.RowDefinitions>
				<StackPanel Grid.Row="0">
					<!--<TextBlock Text="Id:" Style="{StaticResource LabelStyle}" />
					<TextBox Text="{Binding Id, Mode=TwoWay}" Margin="0,0,0,10" />-->

					<TextBlock Text="Name:" Style="{StaticResource LabelStyle}" />
					<TextBox Text="{Binding Name, Mode=TwoWay}" Margin="0,0,0,10" />

					<TextBlock Text="Description:" Style="{StaticResource LabelStyle}" />
				</StackPanel>
				<TextBox Grid.Row="1" Text="{Binding Description, Mode=TwoWay}" AcceptsReturn="True" MinHeight="22" />
			</Grid>
		</Border>

	</Grid>
</UserControl>
